/*
 * @Author: wangjq4214
 * @Date: 2022-05-03 22:54:02
 * @LastEditTime: 2022-05-03 23:05:38
 * @LastEditors: wangjq4214
 */
export const loadingAtom = atom(false);

const stepBareAtom = atom(0);

export const stepAtom = atom(
  (get) => get(stepBareAtom),
  (get, set, update: 'back' | 'submit') => {
    if (update === 'back') {
      set(stepBareAtom, 0);
      return;
    }
    if (update === 'submit') {
      set(stepBareAtom, 1);
      return;
    }
  }
);
